package com.hades.spring.cloud.config.environment;

import org.springframework.cloud.config.server.environment.EnvironmentRepository;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @ClassName: FileRepositoryConfiguration
 * @Description:
 * @Author: Hades
 * @created: 2021/06/03 00:32
 * @Version:1.0
 */
@Configuration
public class FileRepositoryConfiguration {

    @Bean
    public EnvironmentRepository fileEnvironmentRepository(
            ConfigurableEnvironment configurableEnvironment,
            FileEnvironmentRepositoryProperties fileEnvironmentRepositoryProperties) {
        return new FileEnvironmentRepository(configurableEnvironment,
                fileEnvironmentRepositoryProperties);
    }
}
